package com.zyg.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;


@Data
@TableName("sys_user")
public class UserEx {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    private String name;
    private String pass;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @TableField(exist = false)
    private DeptEx dept;

    private Integer deptId;

    @TableField(exist = false)
    private Integer[] roleIds;

    //  后台传递到前台的角色列表
    @TableField(exist = false)
    private List<Role> roles;

}
